package com.fuxue.service.impl;

import com.fuxue.dto.TitleDTO;
import com.fuxue.entity.Title;
import com.fuxue.mapper.TitleMapper;
import com.fuxue.service.TitleService;
import com.fuxue.vo.TitleVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TitleServiceImpl implements TitleService {
       @Autowired
       private TitleMapper titleMapper;

       @Override
       public TitleVO getById(Integer id) {
              TitleVO titleVO = titleMapper.selectAllById(id);

              return titleVO;
       }

       @Override
       public List<Title> getAll(String select) {
              List<Title>list = titleMapper.selectAll(select);

              return list;
       }

       @Override
       public void update(TitleDTO titleDTO) {
              titleMapper.update(titleDTO);
       }
}
